import java.util.Scanner;

public class Main5{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        System.out.println(Palindrome.check(s));
    }
}


class Palindrome {
    public static boolean check(String s) {
        // 在这里实现函数
        s = s.toLowerCase();
        StringBuilder tmpS2 = new StringBuilder();
        for(int i = 0; i < s.length(); i++){
            char ch = s.charAt(i);
            if((ch>= 'a' && ch<= 'z') ||(ch >='0' && ch <= '9')){
                tmpS2.append(ch);
            }
        }
        int left = 0;
        int right = tmpS2.length() - 1;
        while (left < right) {
            if (tmpS2.charAt(left) != tmpS2.charAt(right)) {
                return false;
            } else {
                left++;
                right--;
            }
        }
        return true;
    }
}